package com.example.springboot_demo.dto.test;

import lombok.Data;
import org.apache.ibatis.annotations.Mapper;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.context.annotation.Configuration;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * <P> @Author: SongKeCheng
 * <P> Type: Class
 * <P> Description:
 * <P> Date: 2024/6/22:8:57
 */

@SuppressWarnings({"unchecked", ""})
@Component
@Data
public class Student {
    private static final Logger log = LoggerFactory.getLogger(Student.class);


    //{
    @Autowired //根据类型注入
    // 如果改类型 下有多个 bean ,根据名称注入
    @Qualifier(value = "teacher1")
    //}

    //@Resource //根据bean 名称注入
    private Teacher teacher2;


}
